﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yun.Interface;
using Yun.Response;
using Yun.Util;

namespace Yun.IM.Request
{
    /// <summary>
    /// 阿里云取消定时推送任务
    /// yun.im.aliyun.cancel.push
    /// </summary>
    public class CancelPushRequest : ITopRequest<IntResultResponse>
    {
        /// <summary>
        /// AppKey信息
        /// </summary>
        public long? AliyunAppKey { get; set; }


        /// <summary>
        /// 推送任务id
        /// </summary>
        public string MessageId { get; set; }


        public void Validate()
        {
            RequestValidator.ValidateRequired("aliyunappkey", AliyunAppKey);
            RequestValidator.ValidateRequired("messageid", MessageId);
        }

        public string GetApiName()
        {
            return "yun.im.aliyun.cancel.push";
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"aliyunappkey", AliyunAppKey},
                {"messageid", MessageId} 
            };

            return parameters;
        }




    }
}
